package com.ttl.common.util;

import java.util.List;
 
public class PageJsp {

	private	int allElements;
	private	int currentPage;
	private	int	maxEntriesPerPage;
	@SuppressWarnings("rawtypes")
	private	List resultList;
		
	public int getAllElements() {
		return allElements;
	}
	public void setAllElements(int allElements) {
		this.allElements = allElements;
	}	
	public int getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	public int getMaxEntriesPerPage() {
		return maxEntriesPerPage;
	}
	public void setMaxEntriesPerPage(int maxEntriesPerPage) {
		this.maxEntriesPerPage = maxEntriesPerPage;
	}
	@SuppressWarnings("rawtypes")
	public List getResultList() {
		return resultList;
	}
	@SuppressWarnings("rawtypes")
	public void setResultList(List resultList) {
		this.resultList = resultList;
	}
	
	public boolean isNextPage() {
		return getAllElements() > getCurrentPage()*getMaxEntriesPerPage();
	}
	
	public boolean isPreviousPage() {
		return getCurrentPage() > 1;
	}
	public boolean isFirstPage() {
		return getCurrentPage()>1;
	}
	public boolean isLastPage() {
		return isNextPage();
	}
	

}
